home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
var
/
lib
/
dpkg
/
info
/
dpkg.preinst
< prev
next >
Wrap
Text File
|
2008-09-03
|
1KB
|
55 lines
#!/bin/sh -e
# This script can be called in the following ways:
#
# Before the package is installed:
# <new-preinst> install
#
# Before removed package is upgraded:
# <new-preinst> install <old-version>
#
# Before the package is upgraded:
# <new-preinst> upgrade <old-version>
#
#
# If postrm fails during upgrade or fails on failed upgrade:
# <old-preinst> abort-upgrade <new-version>
# Handle upgrades from pre-conffile dpkg.cfg
upgrade_dpkg_non_conffile()
{
if [ -r /etc/dpkg/dpkg.cfg ]; then
dpkg_cfg_md5="535552ad5ee9145dbc7a34c264df4e59 /etc/dpkg/dpkg.cfg"
if echo "$dpkg_cfg_md5" | md5sum -c >/dev/null 2>&1; then
echo "Removing non-modified dpkg.cfg to be replaced by a conffile ..."
rm -f /etc/dpkg/dpkg.cfg
fi
fi
}
case "$1" in
install)
;;
upgrade)
case "$2" in
# Upgrade from pre-conffile dpkg.cfg
1.9.21 | 1.10.* )
upgrade_dpkg_non_conffile
;;
esac
;;
abort-upgrade)
;;
*)
echo "$0 called with unknown argument \`$1'" 1>&2
exit 1
;;
esac
exit 0